<?php

//error_reporting(E_ERROR | E_WARNING | E_PARSE);
mysql_connect(localhost, root, root);
@mysql_select_db(os) or die("Unable to select database");
set_time_limit(0);
ini_set("memory_limit", "200M");
date_default_timezone_set("PRC"); //timezone

mysql_query("TRUNCATE TABLE os.down");

$handle = @fopen("http://114.80.213.44/log/start.log", "r");
if ($handle) {
    while (!feof($handle)) {
        $buffer = fgets($handle, 4096);
        echo $buffer;
 mysql_query("INSERT INTO down (datetime,date)
                    VALUES('$buffer','$buffer')") or die(mysql_error());
    }
    fclose($handle);
}
?>
